Network devices such as routers and switches typically include an interface through which a user (e.g., a network manager) can obtain configuration and other types of information about the network device. One well-known network device interface is the command line interface (CLI) of the Cisco IOS operating system, which is run by most network devices made by Cisco Systems, Inc. Network devices provided by other vendors typically include similar network device interfaces.
For such network devices, the configuration state is typically represented by a text file, often referred to as the configuration file. The network device interface typically includes a command or other mechanism by which the user can obtain a copy of the configuration file. For example, in order to obtain the configuration file from a Cisco device, the user typically enters the “show run” command via the CLI. The configuration file is important to the network manager, since it reflects the operational configuration of the network device, which may be different than the original configuration of the network device, for example, due to configuration changes made to the device (e.g., through the CLI, through SNMP, or otherwise). Therefore, a network manager generally must know how to read the configuration file.
In practice, it can be very difficult for the user to read and understand the configuration file because configuration files can be quite large and can be quite complex. For example, a configuration file can be many pages long and can be divided into hierarchical contexts, with each context including a set of specified commands that typically corresponds with a certain network technology, such as routing protocols, access lists and multi-castings. Within the configuration file, one command line may refer to other command lines located in distant parts of the configuration file, making it difficult for the user to find the desired context. Also, because network technology evolves quickly and most users are only expert in some fields and may have difficulty catching up with technologies in other fields, it may be difficult for the user to find and understand the context of certain commands that do not fall within the area of expertise. Furthermore, a network professional often reads and compares a context of configurations for more than one network devices, which is hard to do via the CLI.
The Cisco IOS CLI allows the user to specify some rudimentary filtering parameters when running the “show run” command in order to limit the amount of information displayed. For example, the user can specify an “include” filter to display only command lines that include a specified expression (text string) or can specify an “exclude” filter to display only command lines that do not include a specified expression. Such filtering is described, for example, in a document published by Cisco Systems, Inc. entitled Show Command Section Filter for Cisco IOS Release 12.3(2)T dated 2003, which is hereby incorporated herein by reference in its entirety.